import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { SecurityComponent } from './security/security';
import { LogMgmtComponent } from './logMgmt/logMgmt';
import { SecurityEquipmentComponent } from './security/security-equipment/security-equipment';
import { SecurityTypeComponent } from './security/security-type/security-type';
import { LogDetailComponent } from './logMgmt/logDetail';

const routes: Routes = [
	{
		path: '',
		children: [
			{
				path: '',
				redirectTo: 'security',
			},
			{
				path: 'security',
				component: SecurityComponent,
				data: {
					title: '数据权限设置',
					url: 'data/security',
				},
				children:[
					{
						path:'equipment',
						component:SecurityEquipmentComponent,
					},
					{
						path:'type',
						component:SecurityTypeComponent
					}
				]
			},
			{
				path: 'logMgmt',
				component: LogMgmtComponent,
				data: {
					title: '日志管理',
					url: 'data/logMgmt',
				},
			},
			{
				path: 'logDetail',
				component: LogDetailComponent,
				data: {
					title: '日志管理',
					url: 'data/logDetail',
				},
			},
		],
	},
];

@NgModule({
	imports: [RouterModule.forChild(routes)],
	exports: [RouterModule],
})
export class DataMgmtRoutingModule {}
